Unguarded Recursion on Coinductive Resumptions
نویسندگان
چکیده
A pervasive challenge in programming theory and practice are feature combinations. Here, we propose a semantic framework that combines monad-based computational effects (e.g. store, nondeterminism, random), underdefined or free operations (e.g. actions in process algebra and automata, exceptions), and recursive definitions (e.g. loops, systems of process equations). The joint treatment of these phenomena has previously led to models tending to one of two opposite extremes: extensional as, e.g., in domain theory, and intensional as in classical process algebra and more generally in universal coalgebra. Our metalanguage for effectful recursive definitions, designed in the spirit of Moggi’s computational metalanguage, flexibly combines these intensional and extensional aspects of computations in a single framework. We base our development on a notion of complete Elgot monad, whose defining feature is a parametrized uniform iteration operator satisfying natural axioms in the style of Simpson and Plotkin. We provide a mechanism of adjoining free operations to such monads by means of cofree extensions, thus in particular allowing for a non-trivial semantics of non-terminating computations with free effects. Our main result states that the class of complete Elgot monads is closed under such cofree extensions, which thus serve as domains for effectful recursive definitions with free operations. Elgot monads do not require the iterated computation to be guarded, and hence iteration operators are not uniquely determined by just their defining fixpoint equation. Our results however imply that they are uniquely determined as extending the given iteration in the base effect and satisfying the axioms. We discuss a number of examples formalized in our metalanguage, including (co)recursive definitions of process-algebraic operations on sideeffecting processes.
منابع مشابه
Resumptions, Weak Bisimilarity and Big-Step Semantics for While with Interactive I/O: An Exercise in Mixed Induction-Coinduction
We look at the operational semantics of languages with interactive I/O through the glasses of constructive type theory. Following on from our earlier work on coinductive trace-based semantics for While [17], we define several big-step semantics for While with interactive I/O, based on resumptions and termination-sensitive weak bisimilarity. These require nesting inductive definitions in coinduc...
متن کاملThe Coinductive Resumption Monad
Resumptions appear in many forms as a convenient abstraction, such as in semantics of concurrency and as a programming pattern. In this paper we introduce generalised resumptions in a categorytheoretic, coalgebraic context and show their basic properties: they form a monad, they come equipped with a corecursion scheme in the sense of Adámek et al.’s notion of completely iterative monads (cims),...
متن کاملCoinductive Big-Step Semantics for Concurrency
In a paper presented at SOS 2010 [13], we developed a framework for big-step semantics for interactive input-output in combination with divergence, based on coinductive and mixed inductivecoinductive notions of resumptions, evaluation and termination-sensitive weak bisimilarity. In contrast to standard inductively defined big-step semantics, this framework handles divergence properly; in partic...
متن کاملUnifying Guarded and Unguarded Iteration
Models of iterated computation, such as (completely) iterative monads, often depend on a notion of guardedness, which guarantees unique solvability of recursive equations and requires roughly that recursive calls happen only under certain guarding operations. On the other hand, many models of iteration do admit unguarded iteration. Solutions are then no longer unique, and in general not even de...
متن کاملGuarded and Unguarded Iteration for Generalized Processes
Models of iterated computation, such as (completely) iterative monads, often depend on a notion of guardedness, which guarantees unique solvability of recursive equations and requires roughly that recursive calls happen only under certain guarding operations. On the other hand, many models of iteration do admit unguarded iteration. Solutions are then no longer unique, and in general not even de...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 319 شماره
صفحات -
تاریخ انتشار 2015